{"id":21131383,"url":"https://github.com/jrop/react-router-spa-demo","last_synced_at":"2025-06-10T22:03:39.530Z","repository":{"id":34794134,"uuid":"38778377","full_name":"jrop/react-router-spa-demo","owner":"jrop","description":"A single page application that can also render on the server using React.js","archived":false,"fork":false,"pushed_at":"2017-09-01T17:24:43.000Z","size":6,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-10T16:04:10.184Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jrop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-08T20:32:25.000Z","updated_at":"2015-07-08T20:32:47.000Z","dependencies_parsed_at":"2022-07-17T05:30:33.652Z","dependency_job_id":null,"html_url":"https://github.com/jrop/react-router-spa-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrop%2Freact-router-spa-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrop%2Freact-router-spa-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrop%2Freact-router-spa-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrop%2Freact-router-spa-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jrop","download_url":"https://codeload.github.com/jrop/react-router-spa-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrop%2Freact-router-spa-demo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259159621,"owners_count":22814490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T05:55:16.151Z","updated_at":"2025-06-10T22:03:39.492Z","avatar_url":"https://github.com/jrop.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"react-router-spa-demo\n=====================\n\nThis is a very simple project that can render the requested page on the server-side, and then leave any other rendering to the client (using React + react-router).  It reuses as much code as possible (i.e., the React Components to construct the views).\n\nBuilding\n========\n\nTo build the project, first make sure you have webpack installed:\n\n```\nnpm i -g webpack\n```\n\nThen you may build:\n\n```\nnpm install\n\n#\n# now go in an re-install react-router\n# to use the latest version (1.0.0-beta3)\n#\ncd node_modules/\nrm -rf react-router/\ngit clone https://github.com/rackt/react-router.git\ncd react-router/\nnpm install\n\n#\n# Get back to root directory and build\n#\ncd ../..\nwebpack\n\n#\n# Run the server\n#\nnode main.js\n```\n\nBasic Structure\n===============\n\nHere is a basic structure of the source files:\n\n* `assets/` - The source files that webpack reads in\n  * the entry file is: `assets/js/app.js`\n  * all of the files in this folder except `app.js`, and `client-routes.js` can run on both the client (browser) and the server (node)\n* `controllers/` - The controllers for handling HTTP requests\n* `views/default.vash` - The basic HTML5 template used by express.js\n* `controller.js` - The base-controller\n* `main.js` - The main server entry-point; this file proxies `server.js`, loading the babel.js hook first\n* `server.js` - The file that sets up express.js middleware/routes, etc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrop%2Freact-router-spa-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjrop%2Freact-router-spa-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrop%2Freact-router-spa-demo/lists"}