{"id":15504574,"url":"https://github.com/alanbsmith/react-node-example","last_synced_at":"2025-05-08T21:18:08.118Z","repository":{"id":78448071,"uuid":"42970569","full_name":"alanbsmith/react-node-example","owner":"alanbsmith","description":"a minimalist starter repo for React and Node to deploy to heroku","archived":false,"fork":false,"pushed_at":"2020-09-30T18:47:16.000Z","size":104,"stargazers_count":193,"open_issues_count":1,"forks_count":83,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-08T21:17:59.043Z","etag":null,"topics":["heroku","nodejs","reactjs","webpack"],"latest_commit_sha":null,"homepage":"","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/alanbsmith.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":"2015-09-23T01:17:37.000Z","updated_at":"2025-03-15T10:21:56.000Z","dependencies_parsed_at":"2023-04-22T17:46:06.581Z","dependency_job_id":null,"html_url":"https://github.com/alanbsmith/react-node-example","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":0.07692307692307687,"last_synced_commit":"bfe6de33ed818458813a15160bf174247d69d03d"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanbsmith%2Freact-node-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanbsmith%2Freact-node-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanbsmith%2Freact-node-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanbsmith%2Freact-node-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alanbsmith","download_url":"https://codeload.github.com/alanbsmith/react-node-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253149622,"owners_count":21861740,"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":["heroku","nodejs","reactjs","webpack"],"created_at":"2024-10-02T09:19:01.752Z","updated_at":"2025-05-08T21:18:08.095Z","avatar_url":"https://github.com/alanbsmith.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React + Node Starter\n_for [Heroku](https://www.heroku.com/) deployment_\n\n## OVERVIEW\nThis is a simple starter to get you up and running for React projects. This is intended to provide:\n\n* a lightweight Webpack config (for development and production)\n* some helpful tooling for development workflow\n* a similar setup to what you'll see in the wild\n* Heroku-ready deployment setup\n\n## UP \u0026 RUNNING\nInstall dependencies:\n```\n$ npm install\n```\n_or_\n```\n$ yarn\n```\n\nFire up a development server:\n```\n$ yarn dev\n```\n\nOnce the server is running, you can visit `http://localhost:8080/`\n\n## Linting\n_This assumes you have eslint and eslint-watch installed. If you don't, run the following:_\n```\n$ npm i -g eslint eslint-watch\n```\nor if you need permissions:\n```\n$ sudo npm i -g eslint eslint-watch\n```\n\nTo run the linter once:\n```\n$ yarn lint\n```\n\nTo run the watch task:\n```\n$ yarn lint:watch\n```\n\n## Testing\nAn initial test suite has been setup with two tests (one passing and one intentionally failing).\nWe're using Jest and Enzyme for our test setup. The basic test setup lives in `./__tests__`.\nThe main configuration for Jest lives at the bottom of `package.json`.  I've also added a few\nhandy scripts, which I've listed below. Jest also gives us a test coverage tool for free, so I've added that too. The setup is at the bottom of `package.json`. Everything is set to 90% coverage, but your welcome to update that to whatever you'd like.\n\nTo run the tests once:\n```\n$ yarn test\n```\n\nTo run the watch script (for only relevant test files)\n```\n$ yarn test:watch\n```\n\nTo run the watch script (for all test files)\n```\n$ yarn test:watchAll\n```\n\nTo view the coverage report:\n```\n$ yarn test:coverage:report\n```\n\n## Review\nIf you'd like to run the linter and tests at once (this is a nice check before pushing to Github or deploys), you can run:\n\n```\n$ yarn review\n```\n\n## Production Build\n\nTo build your production assets and run the server:\n```\n$ yarn start\n```\n\n## CHANGELOG\n**v2.0.0**\nThis app has been updated to use React v.16.0.0! 🎉\n\nMajor Changes:\n* Updates React and ReactDOM to v16\n* Replaces Mocha with Jest\n* Adds `babel-polyfill` and updates Babel config\n* Colocates tests with components\n\nMinor Changes:\n* Updates all other dependencies to latest\n* Allows absolute import paths\n* Adds new test scripts\n* Adds test coverage\n\n**v1.1.0**\nThis app has been updated to use React v15.6 and Webpack 3.5! 🎉\n\nMajor Changes:\n* Updates React and ReactDOM to v15.6\n* Updates Webpack to v3.5\n\nMinor Changes:\n* Updates all other dependencies to latest\n* Updates App.js syntax\n* Updates eslint rules\n* Updates server.js\n* Updates README\n\n**v1.0.0**\nThis app has been updated to use React v15.5 and Webpack 2.3! 🎉\n\nMajor Changes:\n* Updates React and ReactDOM to v15.5\n* Updates Webpack to v2.3\n* Enables hot-reloading for local development\n* Adds initial test suite with Enzyme, Expect, and Mocha\n\nMinor Changes:\n* Updates all other dependencies to latest\n* Updates eslint rules\n* Updates npm scripts\n* Refactors server.js\n* Updates README\n\n**v.0.2.0**\nThis app has been updated to use React v15 and Babel v6! I have also updated the file structure to reflect naming conventions you'll most likely see in other applications. If you'd like to go back to v.0.0.1 (which should've been named 0.1.0), you can find go back to [this commit](https://github.com/alanbsmith/react-node-example/commit/dd6d745c4b7066fd12104d5005b805afaf469d91).\n\n## DEPLOYING TO HEROKU\nThis app is set up for deployment to Heroku!\n\n_This assumes you have already have a Heroku account and have the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) installed_\n```\n$ heroku login\n$ heroku create -a name-of-your-app\n$ git push heroku master\n$ heroku open\n```\n\nHeroku will follow the `build` command in your `package.json` and compile assets with `webpack.prod.config.js`. It runs the Express web server in `server.js`.\n\nIf you're unfamiliar with Heroku deployment (or just need a refresher), they have a really great walkthrough [here](https://devcenter.heroku.com/articles/getting-started-with-nodejs#introduction).\n\n## REDUX STARTER\nIf you're looking for a similar, minimalistic Redux starter, I would recommend Marc Garreau's [here](https://github.com/marcgarreau/redux-starter)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falanbsmith%2Freact-node-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falanbsmith%2Freact-node-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falanbsmith%2Freact-node-example/lists"}