{"id":19396033,"url":"https://github.com/zxbodya/router1-app-template","last_synced_at":"2026-05-06T09:43:33.294Z","repository":{"id":145655016,"uuid":"50037351","full_name":"zxbodya/router1-app-template","owner":"zxbodya","description":"Starter template of universal(isomorphic) app using Router1, RxJS and React","archived":false,"fork":false,"pushed_at":"2018-11-18T16:59:43.000Z","size":676,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-07T10:12:55.354Z","etag":null,"topics":["react","router","router1","rxjs","starter-template","webpack","webpack2"],"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/zxbodya.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-20T15:00:57.000Z","updated_at":"2018-11-18T16:59:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"6885b3d6-9f72-48e4-b8ce-df1170fc51e6","html_url":"https://github.com/zxbodya/router1-app-template","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/zxbodya%2Frouter1-app-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zxbodya%2Frouter1-app-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zxbodya%2Frouter1-app-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zxbodya%2Frouter1-app-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zxbodya","download_url":"https://codeload.github.com/zxbodya/router1-app-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240564605,"owners_count":19821421,"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":["react","router","router1","rxjs","starter-template","webpack","webpack2"],"created_at":"2024-11-10T10:33:16.623Z","updated_at":"2026-05-06T09:43:28.258Z","avatar_url":"https://github.com/zxbodya.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"React + RxJS + Router1 Application template\n========================\n\nApplication starter template.\n\nIntended to be used for implementing single page applications with possibility to have server side rendering. \n \nFollowing libraries are used:\n\n1. ReactJS\n2. RxJS\n3. ExpressJS\n4. Router1 + Router1 React\n5. rx-react-container\n\nAnd tools:\n\n1. Webpack - to bundle all the things\n2. BabelJS - for es2015 syntax \n3. Node SASS \n4. PostCSS with autoprefixer\n5. Nodemon\n6. Jest\n\n## How is it different?\n\nActually it is not much different from all other boilerplates - same tools and similar config.\n\nBut there is one thing that makes it different - there is helper script(`dev-server.js`),\nto keep server side and client side parts reloads in sync. \n\nIt a wrapper around webpack compiler, webpack-serve and a nodemon,\nit adds proxy into webpack-serve that ensures that all reloads from browser are loading data from recent\nserver-side bundle - it will wait before request processing if new build is in progress or when server is not ready yet.       \n\nIn result it removes some frustration, especially when changing code shared between server and client parts.\n\n## Development environment setup\n\n0. Check your Node.js version - it should be version 8 or later\n1. Install dependencies using npm (or yarn)\n2. start server app, with automatic recompile and reload when something changes\n    - `npm run dev`\n3. open this url in your browser: `http://localhost:8080/`\n\nTo customize host and ports used by application - use environment variables:\n\n- `DEV_SERVER_PORT` - port used by dev server, `8080` by default\n- `DEV_SERVER_WS_PORT` - port used for webpack notifications websocket, `8081` by default\n- `DEV_SERVER_HOST` - host where dev server is running, `localhost` by default \n- `APP_SERVER_PORT` - port user by application, `8082` by default. Is passed as `PORT` environment variable into application.   \n\n**if you have different application host and port different than above - be sure to specify them in environment**\n\nAlso you can enable some other things for dev-server by environment variables\n \n- `HOT=1` to enable hot reload for client side  \n- `SSR=1` to enable server-side rendering in dev environment(disabled by default because typically you need test things on client side first)\n\nFor setting those variables - you can create `.env` file at project root.\n\n## React Hot Loader\n\nConfiguration is not complete, and right now is not in usable state by default.\n\nTo fix it you need to add `module.hot.accept` code. See https://github.com/gaearon/react-hot-loader#getting-started for details(step 4). \n \n## Production compilation and server\n\nBuild sources:\n\n- `npm run build`\n\nStart server:\n\n- `node server`\n\nSet env variable `SSR=1` to enable server side rendering.\nAs for dev-server - you can create `.env` file at project root.\n\n## Project folder structure\n\n - `build` build stats, server\n - `public` static assets\n - `public/_assets` webpack build results\n - `src` application sources\n - `src/client` browser specific sources\n - `src/server` server specific sources\n - `tools` tooling and config scripts (webpack, dev server)\n\n### Build visualization\n\nAfter a production build you may want to visualize your modules and chunks tree.\n\nUse the [webpack.github.io/analyse](http://webpack.github.io/analyse/) with the file at `build/stats.json`.\n\nAlso I like using [webpack-bundle-analyzer](https://github.com/th0r/webpack-bundle-analyzer) - recommend trying it too.\n\n\n### Loaders and file types\n\nMany file types are preconfigured, but not every loader is installed. If you get an error like `Cannot find module \"xxx-loader\"`, you'll need to install the loader with `npm install xxx-loader --save` and restart the compilation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzxbodya%2Frouter1-app-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzxbodya%2Frouter1-app-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzxbodya%2Frouter1-app-template/lists"}