{"id":22792679,"url":"https://github.com/johnantoni/react-express-auth-codealong","last_synced_at":"2026-04-05T23:34:40.891Z","repository":{"id":66484240,"uuid":"126719995","full_name":"johnantoni/react-express-auth-codealong","owner":"johnantoni","description":"react express jwt auth code-along","archived":false,"fork":false,"pushed_at":"2018-03-25T19:59:39.000Z","size":242,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-30T17:17:38.195Z","etag":null,"topics":["authentication","express","jwt","react"],"latest_commit_sha":null,"homepage":"https://johnantoni.com","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/johnantoni.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":"2018-03-25T17:05:14.000Z","updated_at":"2018-10-16T15:19:15.000Z","dependencies_parsed_at":"2023-07-26T09:30:28.844Z","dependency_job_id":null,"html_url":"https://github.com/johnantoni/react-express-auth-codealong","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/johnantoni/react-express-auth-codealong","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Freact-express-auth-codealong","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Freact-express-auth-codealong/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Freact-express-auth-codealong/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Freact-express-auth-codealong/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnantoni","download_url":"https://codeload.github.com/johnantoni/react-express-auth-codealong/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Freact-express-auth-codealong/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31454199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"ssl_error","status_checked_at":"2026-04-05T21:22:51.943Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["authentication","express","jwt","react"],"created_at":"2024-12-12T03:15:46.897Z","updated_at":"2026-04-05T23:34:40.867Z","avatar_url":"https://github.com/johnantoni.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-express-boilerplate\n\nThis is an example of how to construct a simple react and express boilerplate. There are advantages and disadvantages to this particular approach which we'll discuss in class, but this is the quickest way to get started and organized on a small React/Express project.\n\nIf you plan to expand to larger projects, I would recommend splitting your application into two separate repositories: one for your express server, and one for your react app.\n\n1. `create-react-app react-express-boilerplate \u0026\u0026 cd react-express-boilerplate`\n\n2. `mkdir lib`\n\n3. `npm install express --save`\n\n4. `cd lib \u0026\u0026 touch server.js`\n\n5. Inside `server.js:`\n\n```javascript\nconst express = require(\"express\");\n\nconst app = express();\nconst PORT = 8080;\n\napp.get(\"/hello\", (req, res) =\u003e {\n  res.status(200).json({\n    message: \"hello world\"\n  });\n});\n\napp.listen(PORT, () =\u003e {\n  console.log(`Listening on ${PORT}`);\n});\n```\n\n6. `npm install concurrently --save-dev`\n\n7. `npm install nodemon -g`\n\n8. In `package.json`:\n\n```json\n{\n  \"name\": \"react-express-boilerplate\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"dependencies\": {\n    \"express\": \"^4.16.2\",\n    \"react\": \"^16.2.0\",\n    \"react-dom\": \"^16.2.0\",\n    \"react-scripts\": \"1.1.1\"\n  },\n  \"proxy\": \"http://localhost:8080/\",\n  \"scripts\": {\n    \"client\": \"react-scripts start\",\n    \"build\": \"react-scripts build\",\n    \"test\": \"react-scripts test --env=jsdom\",\n    \"eject\": \"react-scripts eject\",\n    \"server\": \"nodemon lib/server.js\",\n    \"start\":\n      \"concurrently --kill-others-on-fail \\\"npm run server\\\" \\\"npm run client\\\"\"\n  },\n  \"devDependencies\": {\n    \"concurrently\": \"^3.5.1\"\n  }\n}\n```\n\n9. `npm install axios --save`\n\n10. In `/src/App.js`:\n\n```javascript\nimport React, { Component } from \"react\";\nimport logo from \"./logo.svg\";\nimport \"./App.css\";\nimport axios from \"axios\";\n\nclass App extends Component {\n  componentDidMount() {\n    axios.get(\"/hello\").then(res =\u003e {\n      console.log(res.data);\n    });\n  }\n  render() {\n    return (\n      \u003cdiv className=\"App\"\u003e\n        \u003cheader className=\"App-header\"\u003e\n          \u003cimg src={logo} className=\"App-logo\" alt=\"logo\" /\u003e\n          \u003ch1 className=\"App-title\"\u003eWelcome to React\u003c/h1\u003e\n        \u003c/header\u003e\n        \u003cp className=\"App-intro\"\u003e\n          To get started, edit \u003ccode\u003esrc/App.js\u003c/code\u003e and save to reload.\n        \u003c/p\u003e\n      \u003c/div\u003e\n    );\n  }\n}\n\nexport default App;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnantoni%2Freact-express-auth-codealong","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnantoni%2Freact-express-auth-codealong","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnantoni%2Freact-express-auth-codealong/lists"}